package me.shiqiang.im.domain;

import org.springframework.data.annotation.Id;
import org.springframework.data.redis.core.RedisHash;

import java.util.HashMap;
import java.util.Map;

/**
 * @author cuishiqiang
 * @date 2017/12/8 下午1:13
 */
@RedisHash("groups")
public class Group {
    /** 群ID */
    @Id
    private Long groupId;

    /** 群名称 */
    private String groupName;

    /** 群类型
     * 1、官方群 2、非官方群
     */
    private Integer type;

    private Integer servicePlatformType;

    private Integer mute;

    private String avatar;

    private String announcement;

    private String announcementModifyDate;

    private Long announcementModifyUserId;

    private String backgroundImg;

    private Long ownerId;

    private Map<Long,GroupUser>  users;

    /**
     * 来源Id
     */
    private Long fromId;

    public Group() {
        this.users = new HashMap<>();
    }

    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    public String getAnnouncementModifyDate() {
        return announcementModifyDate;
    }

    public void setAnnouncementModifyDate(String announcementModifyDate) {
        this.announcementModifyDate = announcementModifyDate;
    }

    public Long getAnnouncementModifyUserId() {
        return announcementModifyUserId;
    }

    public void setAnnouncementModifyUserId(Long announcementModifyUserId) {
        this.announcementModifyUserId = announcementModifyUserId;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getMute() {
        return mute;
    }

    public void setMute(Integer mute) {
        this.mute = mute;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getAnnouncement() {
        return announcement;
    }

    public void setAnnouncement(String announcement) {
        this.announcement = announcement;
    }

    public Long getOwnerId() {
        return ownerId;
    }

    public void setOwnerId(Long ownerId) {
        this.ownerId = ownerId;
    }

    public Map<Long, GroupUser> getUsers() {
        return users;
    }

    public void setUsers(Map<Long, GroupUser> users) {
        this.users = users;
    }

    public String getBackgroundImg() {
        return backgroundImg;
    }

    public void setBackgroundImg(String backgroundImg) {
        this.backgroundImg = backgroundImg;
    }

    public Long getFromId() {
        return fromId;
    }

    public void setFromId(Long fromId) {
        this.fromId = fromId;
    }

    public Integer getServicePlatformType() {
        return servicePlatformType;
    }

    public void setServicePlatformType(Integer servicePlatformType) {
        this.servicePlatformType = servicePlatformType;
    }
}
